package com.dingli.service.impl;

import com.dingli.framework.entity.Member;
import com.dingli.framework.entity.Role;
import com.dingli.framework.entity.User;
import com.dingli.framework.mapper.MemberMapper;
import com.dingli.framework.mapper.RoleMapper;
import com.dingli.framework.mapper.UserMapper;
import com.dingli.framework.util.Response;
import com.dingli.service.ISystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SystemService implements ISystemService {

    @Autowired
    private RoleMapper roleMapper;

    @Autowired
    private MemberMapper memberMapper;

    @Override
    public Response<Role> relogin(Long roleId, String password) {
        Role role = roleMapper.relogin(roleId, password);
        return new Response<>(200, "success", role);
    }

    @Override
    public Response<Member> MBlogin(Long mbID, String password) {
        Member member = memberMapper.MBlogin(mbID, password);
        return new Response<>(200,"success",member);
    }


}
